319. 灯泡开关
https://leetcode-cn.com/problems/bulb-switcher/
- 提交时间:2021-11-15 12:30:51
- 执行用时:0 ms, 在所有 Go 提交中击败了100.00%的用户
- 内存消耗:1.9 MB, 在所有 Go 提交中击败了100.00%的用户
- 通过测试用例:35 / 35
func bulbSwitch(n int) int {
return int(math.Sqrt(float64(n) + 0.5))
}
https://leetcode-cn.com/problems/bulb-switcher/
func bulbSwitch(n int) int {
return int(math.Sqrt(float64(n) + 0.5))
}